//  const reg = new RegExp('/financesub/\\w*?/\\w*?[b|B]uy.*?(/?).*?')
//  const test = "/financesub/comm/aaBuy/?a=1".match('/financesub/\\w*?/\\w*?[b|B]uy.*?(/?).*?')
//  console.log(test)
// const str = "hello wolrld! hello again!"
// //大小写， g全局匹配
// const regex = /hel(lo)?/g
// const matches = regex.exec(str)
// const matches2 = regex.exec(str)
// const matche2 = str.match(regex)
// let regexp = /".+"/g;
// let str = 'a "witch" and her "broom" is one';
// console.log(matches,matches2)
// const str2 = "abcabc";
// const result = str2.match(/ab+c/g);
// console.log(result); // ["abc"]
// let regexp = /".+?"/g;
// let str = 'a "witch" and her "broom" is one';
// console.log( str.match(regexp) ); 
// const regex = /(\d{2})-(\d{2})-\2-\1/;
// const str = "12-34-34-12";
// const match = regex.exec(str);
// if (match) {
//     console.log("找到匹配:", match);
// } else {
//     console.log("未找到匹配");
// }
// const str = "abccabc";
// const result = str.match(/ab+c/);
// console.log(result); // ["abc"]

// const regex = /(?<y>\d{4})-(?<m>\d{2})-(?<d>\d{2})/
// const str = "2024-12-12"
// const result = regex.exec(str)
// console.log(result.groups.y)
//E:\a\b\c ==\b
// const regex = new RegExp("https:\\\\.*?");
const regex = /E:\/a\/b/
console.log("E:/a/b".match(regex))
